<template>
	<div>
		<div class="recommend-title">
			猜你喜欢
		</div>
		<ul>
			<router-link
			tag="li"
			class="item border-bottom"
			v-for="item of list"
			:key="item.id"
			:to="'/detail/' + item.id"
			>
				<img :src="item.imgUrl" class="item-img">
				<div class="item-info">
					<p class="item-title">{{item.title}}</p>
					<p class="item-desc">{{item.desc}}</p>
					<button class="item-button">查看详情</button>
				</div>
			</router-link>
		</ul>
	</div>
</template>

<script>
export default {
	name : 'recommend',
	props: {
		list:Array
	}
}
</script>

<style lang="stylus" scoped>
	.recommend-title
		line-height .8rem
		text-indent .2rem
		background-color #eee
		margin-top .2rem
	.item
		height 1.9rem
		display flex
		overflow hidden
		.item-img
			height 1.7rem
			width 1.7rem
			padding .1rem
		.item-info
			flex 1
			padding .1rem
			.item-title
				line-height .54rem
				font-size .32rem
			.item-desc
				line-height .4rem
				color #aaa
			.item-button
				background-color #ff9300
				padding 0 .2rem
				color #fff
				line-height .44rem
				border-radius .06rem
				margin-top .2rem
</style>
